package com.self.campussecondhandmarket.resp;

/**
 * Author: Vincent
 * <p> DateTime: 2024/2/13 22:14
 * <p> Description:
 * <p>
 **/
public enum Code implements Status {
	
	SUCCESS(200, "success"),
	FAIL(400, "fail"),
	NOT_FOUND(404, "not found"),
	NOT_AUTHORIZED(401, "not authorized"),
	NOT_ALLOWED(403, "not allowed"),
	NOT_ACCEPTABLE(406, "not acceptable"),
	NOT_MODIFIED(304, "not modified"),
	INTERNAL_SERVER_ERROR(500, "internal server error"),
	NOT_IMPLEMENTED(501, "not implemented"),
	;
	
	
	private  Integer code;
	private String msg;
	
	Code(Integer code, String msg) {
		this.code = code;
		this.msg = msg;
	}
	
	@Override
	public Integer code() {
		return code;
	}
	
	@Override
	public String msg() {
		return msg;
	}
}
